<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdn.bootcss.com/vue/2.6.11/vue.min.js"></script>
</head>
<body>
    <!-- 键盘修饰符 -->
    <div id="app">
        <!-- 要求，只有弹起的按键是a的时候，才触发事件  -->
        <input type="text" @keyup.enter="f1">
    </div>    
    <script>
        var app = new Vue({
            el: "#app",
            data: {
                msg: "123123"
            },
            methods: {
                f1() {
                    console.log("f1...");
                    
                }
            }
        });
    </script>
</body>
</html>